package org.example.redis_concurrent.utils;

import java.io.FileWriter;
import java.io.IOException;

public class FileUtils {

    public static void saveString2File(String fileName ,String content) {
        try (FileWriter fileWriter = new FileWriter(fileName,true)) {
            fileWriter.write(content);
            System.out.println("字符串已保存到文件：" + fileName);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
